/**
 * Created by Administrator on 2017/11/6.
 */
var Index = 0;
var stop=''
function changeImg() {
    var obj = document.getElementsByClassName("changeImg");

    if(!obj.length){
        return
    }

    if (Index == obj.length-1) {
        Index = 0;
    } else {
        Index += 1;
    }
    for(var i=0;i<obj.length;i++){
        if(i==Index){
            obj[i].style.opacity=1
            continue
        }
        obj[i].style.opacity=0
    }
}
function stopChange() {
    clearInterval(stop)
}
function startChange() {
    stop = setInterval(changeImg,3000);
}
startChange()